package net.lijingye.education.controller;

import net.lijingye.education.response.BaseResponse;
import net.lijingye.education.response.ErrorResponse;
import net.lijingye.education.response.meta.AlreadyLoginMeta;
import net.lijingye.education.response.meta.FileNotFoundMeta;
import net.lijingye.education.response.meta.InternalErrorMeta;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by LijingYe on 2016/3/27.
 */
@RestController
public class ErrorController {
    @RequestMapping(path = "/error/ALREADY_LOGIN")
    public BaseResponse alreadyLoginError() {
        return new ErrorResponse(new AlreadyLoginMeta());
    }

    @RequestMapping(path = "/error/INTERNAL")
    public BaseResponse internalError() {
        return new ErrorResponse(new InternalErrorMeta());
    }
}
